﻿using DevExpress.XtraTreeList.Nodes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Event
{
    public static class EventGlobal
    {

        #region 目录树保存事件
        /// <summary>
        /// 目录树保存代理
        /// </summary>
        public delegate void DeRequestDirectorySaveList();
        /// <summary>
        /// 目录树保存事件
        /// </summary>
        public static event DeRequestDirectorySaveList EvRequestDirectorySaveList;
        /// <summary>
        /// 目录树保存触发
        /// </summary>
        public static void SetRequestDirectorySaveList()
        {
            if (EvRequestDirectorySaveList != null)
            {
                EvRequestDirectorySaveList();
            }
        }
        #endregion

        #region 目录树重新加载
        /// <summary>
        /// 目录树重新加载代理
        /// </summary>
        public delegate void DeRequestDirectoryReloadList();
        /// <summary>
        /// 目录树重新加载事件
        /// </summary>
        public static event DeRequestDirectoryReloadList EvRequestDirectoryReloadList;
        /// <summary>
        /// 目录树重新加载触发
        /// </summary>
        public static void SetRequestDirectoryReloadList()
        {
            if (EvRequestDirectoryReloadList != null)
            {
                EvRequestDirectoryReloadList();
            }
        }
        #endregion


        #region 首页-新标签打开事件
        /// <summary>
        /// 首页-新标签打开事件
        /// </summary>
        public delegate void DeIndexTabbedViewOpenNew(string id, string title, TreeListNode tln);
        /// <summary>
        /// 首页-新标签打开事件
        /// </summary>
        public static event DeIndexTabbedViewOpenNew EvIndexTabbedViewOpenNew;
        /// <summary>
        /// 首页-新标签打开事件-触发
        /// </summary>
        public static void SetIndexTabbedViewOpenNew(string id, string title, TreeListNode tln)
        {
            if (EvIndexTabbedViewOpenNew != null)
            {
                EvIndexTabbedViewOpenNew(id,title,tln);
            }
        }
        #endregion

        /// <summary>
        /// 保存事件
        /// </summary>
        public delegate void DeSave();

        /// <summary>
        /// 请求事件
        /// </summary>
        public delegate void DeSend();

        /// <summary>
        /// 版本切换事件
        /// </summary>
        public delegate void DeVersion(int version);

        /// <summary>
        /// 修改目录节点名称
        /// </summary>
        /// <param name="name"></param>
        public delegate void DeNodeModifyName(string name);
      

    }
}
